/*
 * @Descripttion: 考卷设置接口
 * @Author: wind-lc
 * @version: 1.0
 * @Date: 2021-05-17 13:22:35
 * @LastEditTime: 2021-05-17 21:28:11
 * @FilePath: \cscec-pms-admin\src\api\partyMasses\partyStudyInfo\testPaperSetting\index.js
 */
import request from '@/utils/request2';
import { unionApiUrl } from '@/api/config.js';

/**
 * @description: 获取考卷列表
 * @param {Object} data 接口参数
 * @return {Promise} 接口Promise
 */
const queryExamPaperList = data => {
    return request({
        url: `${unionApiUrl}/examPaper/queryExamPaperList`,
        method: 'post',
        data
    })
}
/**
 * @description: 新增考卷
 * @param {Object} data 接口参数
 * @return {Promise} 接口Promise
 */
const insertSelective = data => {
    return request({
        url: `${unionApiUrl}/examPaper/insertSelective`,
        method: 'post',
        data
    })
}
/**
 * @description: 编辑考卷
 * @param {Object} data 接口参数
 * @return {Promise} 接口Promise
 */
const updateByPrimaryKeySelective = data => {
    return request({
        url: `${unionApiUrl}/examPaper/updateByPrimaryKeySelective`,
        method: 'post',
        data
    })
}
/**
 * @description: 删除考卷
 * @param {Object} data 接口参数
 * @return {Promise} 接口Promise
 */
const deleteByPrimaryKey = data => {
    return request({
        url: `${unionApiUrl}/examPaper/deleteByPrimaryKey`,
        method: 'post',
        data
    })
}
/**
 * @description: 获取试题分类列表
 * @param {Object} data 接口参数
 * @return {Promise} 接口Promise
 */
const getExamTypeEnums = data => {
    return request({
        url: `${unionApiUrl}/examType/getExamTypeEnums`,
        method: 'get',
        params: data
    })
}
/**
 * @description: 获取考卷下考题列表
 * @param {Object} data 接口参数
 * @return {Promise} 接口Promise
 */
const getExamPaperDetailById = data => {
    return request({
        url: `${unionApiUrl}/examPaper/getExamPaperDetailById`,
        method: 'post',
        data
    })
}
/**
 * @description: 获取添加考题列表
 * @param {Object} data 接口参数
 * @return {Promise} 接口Promise
 */
const queryAddQeustionList = data => {
    return request({
        url: `${unionApiUrl}/examPaper/queryAddQeustionList`,
        method: 'post',
        data
    })
}
/**
 * @description: 删除考题
 * @param {Object} data 接口参数
 * @return {Promise} 接口Promise
 */
const deletePaperQuestion = data => {
    return request({
        url: `${unionApiUrl}/examPaper/deletePaperQuestion`,
        method: 'post',
        data
    })
}
/**
 * @description: 添加考题
 * @param {Object} data 接口参数
 * @return {Promise} 接口Promise
 */
const addPaperQuestion = data => {
    return request({
        url: `${unionApiUrl}/examPaper/addPaperQuestion`,
        method: 'post',
        data
    })
}
export {
    queryExamPaperList,
    insertSelective,
    updateByPrimaryKeySelective,
    deleteByPrimaryKey,
    getExamPaperDetailById,
    queryAddQeustionList,
    getExamTypeEnums,
    deletePaperQuestion,
    addPaperQuestion
}